#ifndef TCPSOCKETSERVER_H
#define TCPSOCKETSERVER_H

#include "object.h"

#ifdef __MINGW32__
#include <winsock.h>
#else
#include <sys/socket.h>
#include <netinet/in.h>
#endif

#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>

class TcpSocketServer : public Object
{
public:
    explicit TcpSocketServer(Object* parent=0);
    virtual ~TcpSocketServer();

    //void listen();

    virtual void incomingConnection(int sockId);

private:
    int sockfd;
    struct sockaddr_in serv_addr;
    struct sockaddr_in clie_addr;
};

#endif // TCPSOCKETSERVER_H
